var goods=document.getElementById("all")
var divArray=goods.getElementsByClassName("aaa")
var prices=0;
for (var i = 0; i < divArray.length; i++) {
	divArray[i].innerHTML+='<a id="good'+i+'" class="jiahao" style="right: 0.625rem;bottom: 0.625rem;position: absolute;">添加</a>';
	document.getElementById('good'+i).onclick=function(){
		var str=this.id;
		var index=parseInt(str.substring(4,5));
		var price=divArray[index].getElementsByTagName("h3")[0].innerText;
		var p=parseInt(price.substring(1,price.length));
		prices+=p;
		document.getElementById("heji").innerText=prices;
	}
}
function jiesuan(){
	window.location.href="http://127.0.0.1:8848/jdong/pay1.html?price="+prices;
}